/* This file is part of the Scriptic Virtual Machine
 * Copyright (C) 2009 Andre van Delft
 *
 * The Scriptic Virtual Machine is free software: 
 * you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package scriptic.tokens;

public interface ScripticParseTreeCodes {

   /* FieldDeclaration */
   public final static int            ScriptDeclarationCode =  12;
   public final static int     CommunicationDeclarationCode =  13;
   public final static int           ChannelDeclarationCode =  14;

   /* Script Expression */
   public final static int       LayoutScriptExpressionCode =   0;
   public final static int              InfixExpressionCode =   1;
   public final static int        UnaryScriptExpressionCode =   2;
   public final static int  SpecialNameScriptExpressionCode =   3;
   public final static int       NestedScriptExpressionCode =  '(';
   public final static int           NativeCodeFragmentCode =  '{';
   public final static int    EventHandlingCodeFragmentCode =  '.';
   public final static int               ActivationCodeCode =  '<';
   public final static int             DeactivationCodeCode =  '>'; 
   public final static int  ConditionalScriptExpressionCode =  '?';
   public final static int           IfScriptExpressionCode =  'i';
   public final static int        WhileScriptExpressionCode =  'w';
   public final static int          ForScriptExpressionCode =  'f';
   public final static int       SwitchScriptExpressionCode =  's';
   public final static int      CaseTagScriptExpressionCode =  't';
   public final static int         ScriptCallExpressionCode =  'c';
   public final static int   ScriptLocalDataDeclarationCode =  'd';
   public final static int PrivateScriptDataDeclarationCode =  'p';

   // not generated by parser; only in pass 7 and recognized by vm:

   public final static int     SendChannelDeclarationCode   =  15;
   public final static int  ReceiveChannelDeclarationCode   =  16;
   public final static int                ChannelSendCode   =  17;
   public final static int             ChannelReceiveCode   =  18;
   public final static int           TinyCodeFragmentCode   =  19;
   public final static int         UnsureCodeFragmentCode   =  20;
   public final static int        Unsure2CodeFragmentCode   =  21;
   public final static int       ThreadedCodeFragmentCode   =  22;
   public final static int EventHandling0PlusCodeFragmentCode =  23;
   public final static int EventHandling1PlusCodeFragmentCode =  24;
   public final static int EventHandlingManyCodeFragmentCode  =  25;
   public final static int             ZeroExpressionCode   =  26;
   public final static int              OneExpressionCode   =  27;
   public final static int            BreakExpressionCode   =  28;
   public final static int           Ellipsis1OperandCode   =  33;
   public final static int            EllipsisOperandCode   =  29;
   public final static int           Ellipsis3OperandCode   =  30;
   public final static int         LaunchedExpressionCode   =  32;
   public final static int           EllipsisOperatorCode   =  5;
   public final static int             ChannelRequestCode   =  6;
   public final static int       CommunicationRequestCode   =  7;

   public final static int                     RootCode     =  'R';
   public final static int                 CommRootCode     =  'C';
   public final static int           RootScriptCallCode     =  'S';

   public final static int         ParBreakOperatorCode     = '/';
   public final static int          ParOrOperatorCode     = '|';
   public final static int              ParAndOperatorCode     = '&';
   public final static int           ParAnd2OperatorCode     = 1+ParAndOperatorCode; // &&
   public final static int            ParOr2OperatorCode     = '"'; // ||
   public final static int          SuspendOperatorCode     = '#'; 
   public final static int               OrOperatorCode     = '+';
   public final static int              SeqOperatorCode     = ';';
   public final static int           NotSeqOperatorCode     = '%';
   public final static int      ReactiveNotOperatorCode     = '-';
   public final static int              NotOperatorCode     = '~';
}

